package com.ghc.comtroller;

import com.ghc.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @RequestMapping("/{email}/{code}")
    public Boolean send(@PathVariable String email,@PathVariable String code){
        return emailService.send(email, code);
    };
}
